package com.example.demo.utils;

import lombok.Data;

import java.io.Serializable;

/**
 * 响应体信息
 */
@Data
public class JsonResult<T> implements Serializable {
    //是否成功
    private Boolean is;

    //返回消息
    private String msg;

    //返回参数
    private T data;

    public JsonResult(boolean is, String msg){
        this.is = is;
        this.msg = msg;
    }

    public JsonResult(String msg, T data){
        this.is   = true;
        this.msg  = msg;
        this.data = data;
    }
}
